function search(){
    var param={};
    param.mobile=$("[name=mobile]").val();
    param.name = $("[name=name]").val();
    param.address=$("[name=address]").val();
    $("#cys").bootstrapTable("refresh",{query:param});
}

$(document).ready(function () {
    $("#addCys").dialog({
        title:"新增承运商",
        btnName:"新增",
        btnBind:function () {
           var param=$("#addCys form").serialize();
            $.post(ctx+"cys/cys/add",param,function(msg){
               toastr.success(msg);
                $("#addCys").dialog("close");
                $("#cys").bootstrapTable("refresh");
                $("#addCys form")[0].reset();


            });
        }
    })
})

function opedAddCys() {
    $("#addCys").dialog("open");
}

$.getJSON("/cys/group/list",function(arr){
    $(arr).each(function(){
       var $opt=$("<option/>");
       $opt.html(this.groupName);
       $opt.val(this.id);
       $("[name=groupId]").append($opt);
    });
});